<!--面图层，相关参数请参考官网-->
<template>
  <el-amap-loca-polygon
    v-for="(polygonItem, index) in polygonComponents"
    :key="polygonItem"
    :initEvents="false"
    :visible="polygonItem.visible"
    :opacity="polygonItem.opacity"
    :depth="polygonItem.depth"
    :cullface="polygonItem.cullface"
    :acceptLight="polygonItem.acceptLight"
    :source-data="polygonItem.sourceData"
    :layer-style="polygonItem.layerStyle"
    :blockHide="polygonItem.blockHide"
    :zIndex="polygonItem.zIndex"
    :visible-duration="500"
    :ref="`polygonComponents${index}`"
  />
</template>
<script>
export default {
  props: ['polygonComponents'],
  methods: {
    getpolygonComponentsRef(index) {
      return this.$refs[`polygonComponents${index}`];
    },
  },
};
</script>
<style scoped lng="less"></style>
